package com.zige.zige.view;

import com.zige.zige.R;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
;

public class MyImageTextButten extends FrameLayout{
	ImageView image;
	TextView text;

	public MyImageTextButten(Context c, AttributeSet attr) {
		super(c, attr);
		LayoutInflater.from(c).inflate(R.layout.layout_my_image_text_butten, this);  
		image = (ImageView) findViewById(R.id.left_image);  
        text = (TextView) findViewById(R.id.right_text); 
	}
	public void setText(String s) {
		text.setText(s);
	}
	public void setTextColor(int c) {
		text.setTextColor(c);
	}
	public void setTextSize(float s) {
		text.setTextSize(s);
	}
	public void setTextSize(int unit, float s) {
		text.setTextSize(unit, s);
	}
	public void setImage(int id) {
		image.setImageResource(id);
	}
	public void setImage(Drawable d) {
		image.setImageDrawable(d);
	}
	public void setImage(Bitmap b) {
		image.setImageBitmap(b);
	}
	public void setSelected(boolean b) {
		image.setSelected(b);
	}
	
}
